package rs.frenjoynet.core.ui.listener;

import javax.faces.event.PhaseListener;
import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;

import rs.frenjoynet.core.ui.LoginBean;
import org.jboss.seam.Component;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.Log;

/**
 * Created by IntelliJ IDEA.
 * User: ppopovic
 * Date: 08.10.2009.
 * Time: 11.22.52
 * To change this template use File | Settings | File Templates.
 */
public class AuthListener implements PhaseListener
{

	public void afterPhase(PhaseEvent event)
	{
		//To change body of implemented methods use File | Settings | File Templates.
	}

	@Override
	public void beforePhase(PhaseEvent event)
	{
	//	System.out.println("dddddddddddddddddddddddddddddddddd------!!!!!!!---dddd");
		Log log = LogFactory.getLog(this.getClass());
	
		LoginBean loginBean = (LoginBean)Component.getInstance("loginBean");
		loginBean.checkGuidAuthentication();
	}

	public PhaseId getPhaseId()
	{
		return null;  //To change body of implemented methods use File | Settings | File Templates.
	}
}
